<template>
  <router-view v-if="isRouterAlive"></router-view>
</template>

<script>
import { ref, nextTick, provide } from "vue";
export default {
  name: "App",
  setup() {
    // 局部组件刷新
    const isRouterAlive = ref(true);
    const reload = () => {
      isRouterAlive.value = false;
      nextTick(() => {
        isRouterAlive.value = true;
      });
    };
    provide("reload", reload);
    return {
      isRouterAlive
    }
  },
};
</script>

<style>
* {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

body::-webkit-scrollbar {
  display: none;
}
html {
  /*隐藏滚动条，当IE下溢出，仍然可以滚动*/
  -ms-overflow-style: none;
}
body {
  background-image: url("assets/img/back.jpeg");
  background-size: 100% 100%;
  background-position: center center;
  overflow: auto;
}
</style>
